package com.adcc.loadsheet.monitor.vo;

import com.adcc.loadsheet.monitor.entity.BGSMonitor;
import com.adcc.loadsheet.monitor.entity.MonitorStatus;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.google.common.base.Strings;

public class BGSMonitorVO extends BaseVO<BGSMonitor> {

    // 主机名称
    private String host;

    // 网关名称
    private String name;

    // BGS状态
    private MonitorStatus status;

    // AGS状态
    private boolean agsStatus;

    // MQ状态
    private boolean mqStatus;

    // 下行报状态
    private MonitorStatus downlinkStatus;

    // 下行报更新时间
    private String downlinkUpdateTime;

    // 上行报状态
    private MonitorStatus uplinkStatus;

    // 上行报更新时间
    private String uplinkUpdateTime;

    public BGSMonitorVO(){

    }

    public BGSMonitorVO(BGSMonitor bgsMonitor) {
        host = Strings.nullToEmpty(bgsMonitor.getHost());
        name = Strings.nullToEmpty(bgsMonitor.getName());
        status = bgsMonitor.getStatus();
        agsStatus = bgsMonitor.isAgsStatus();
        mqStatus = bgsMonitor.isMqStatus();
        downlinkStatus = bgsMonitor.getDownlinkStatus();
        downlinkUpdateTime = Strings.nullToEmpty(bgsMonitor.getDownlinkUpdateTime());
        uplinkStatus = bgsMonitor.getUplinkStatus();
        uplinkUpdateTime = Strings.nullToEmpty(bgsMonitor.getUplinkUpdateTime());
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public MonitorStatus getStatus() {
        return status;
    }

    public void setStatus(MonitorStatus status) {
        this.status = status;
    }

    public boolean isAgsStatus() {
        return agsStatus;
    }

    public void setAgsStatus(boolean agsStatus) {
        this.agsStatus = agsStatus;
    }

    public boolean isMqStatus() {
        return mqStatus;
    }

    public void setMqStatus(boolean mqStatus) {
        this.mqStatus = mqStatus;
    }

    public MonitorStatus getDownlinkStatus() {
        return downlinkStatus;
    }

    public void setDownlinkStatus(MonitorStatus downlinkStatus) {
        this.downlinkStatus = downlinkStatus;
    }

    public String getDownlinkUpdateTime() {
        return downlinkUpdateTime;
    }

    public void setDownlinkUpdateTime(String downlinkUpdateTime) {
        this.downlinkUpdateTime = downlinkUpdateTime;
    }

    public MonitorStatus getUplinkStatus() {
        return uplinkStatus;
    }

    public void setUplinkStatus(MonitorStatus uplinkStatus) {
        this.uplinkStatus = uplinkStatus;
    }

    public String getUplinkUpdateTime() {
        return uplinkUpdateTime;
    }

    public void setUplinkUpdateTime(String uplinkUpdateTime) {
        this.uplinkUpdateTime = uplinkUpdateTime;
    }

    @Override
    public BGSMonitor toEntity() {
        return null;
    }

    @Override
    public String toJSON() throws JsonProcessingException {
        return null;
    }
}
